﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.Sellers;

namespace ZBJF.Warranty.IBLL
{
    public partial interface ISellerInsuranceProductMappingsService
    {
        SellerInsuranceProductMappings LoadByID(long id);
        bool IsExist(SellerInsuranceProductMappings entity);
        bool AddSellerInsuranceProductMappings(long sellerInsuranceProductID,List<SellerInsuranceProductMappings> sellerInsuranceProductMappings);

        IQueryable<SellerInsuranceProductMappings> LoadInsuranceProducts(long sellerInsuranceProductsId);

        /// <summary>
        /// 获取商家产品映射的所有基础产品ID（打包产品的拆分为基础产品）
        /// </summary>
        /// <param name="sellerInsuranceProductID"></param>
        /// <returns></returns>
        List<int> GetAllInsuranceProductIDs(long sellerInsuranceProductID);
        /// <summary>
        /// 获取商家产品映射的打包产品对应的基础产品
        /// </summary>
        /// <param name="sellerInsuranceProductID"></param>
        /// <returns></returns>
        List<int> GetPackageInsuranceProductIDs(long sellerInsuranceProductID);
        /// <summary>
        /// 获取商家产品映射的基础产品
        /// </summary>
        /// <param name="sellerInsuranceProductID"></param>
        /// <returns></returns>
        List<int> GetNotPackageInsuranceProductIDs(long sellerInsuranceProductID);
    }
}
